package com.vogue.supplymall.admin.business.domain.service.impl;

import com.vogue.ssm.database.dao.BaseDao;
import com.vogue.supplymall.admin.business.domain.dao.AdminDictDao;
import com.vogue.supplymall.admin.business.domain.model.AdminDict;
import com.vogue.supplymall.admin.business.domain.service.AdminDictService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * The type Admin dict service.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-05-07
 */
@Service("adminDictService")
public class AdminDictServiceImpl extends BaseServiceImpl<AdminDict, Long> implements AdminDictService {
    @Resource
    private AdminDictDao adminDictDao;

    /**
     * Instantiates a new Admin dict service.
     *
     * @param baseDao the base dao
     */
    public AdminDictServiceImpl(BaseDao<AdminDict, Long> baseDao) {
        super(baseDao);
    }

    @Override
    public List<Map<String, Object>> findDict(Integer type, String keyword) {
        return adminDictDao.findDict(type, keyword);
    }

    @Override
    public List<Map<String, Object>> findDict(Integer type) {
        return adminDictDao.findDict(type, null);
    }
}
